<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../jslib/jquery.min.js"></script>
<link rel="stylesheet" href="../css/a.css" type="text/css" /> 

<script type="text/javascript">
$(document).ready(function(){
 	$("#button1").click(function(){
   	//alert("hello");
		$.get("http://localhost:8888/find?timeStamp="+new Date(),function(data,status){
			//
		    alert("Data: " + data + "\nStatus: " + status);
		  });
		
		
  });
	 
	
	$("#button2").click(function(){
		$.post("http://localhost:8888/insert",
				  {
				    name:"DonaldDuck",
				    number:"77777777777",
				    address:"Duckburg"
				  },
				  function(data,status){
				    alert("Data: " + data + "\nStatus: " + status);
				  });
	});
	 
	//----------------test-----------------------
/* 	$("#button1").click(function(){
	   	//alert("hello");
			
			    alert("hello");
			
	  }); */
});
</script>


</head>
<body>
<table>
	<tr>
		<td>
		<input type="button" id="button1" class="class1" value="发送get请求并接收数据" />
		</td>
	</tr>
	<tr>
		<td>
		<input type="button" id="button2" class="class1" value="发送post请求并插入数据"/>
		</td>
	</tr>
</table>
<!-- 	<input type="button" id="button1" class="class1" value="发送get请求并接收数据" />
	<input type="button" id="button2" value="发送post请求并插入数据"/> -->
	<div id="div_content">
	  <!-- 接收数据用的div -->
	
	</div>
</body>
</html>